#include <QtGui/QApplication>
#include "qmlapplicationviewer.h"
#include "qsamplehswidget.h"
#include "qsamplesmhswidget.h"
#include "qappswitcher.h"

int main(int argc, char *argv[])
{
    QApplication app(argc, argv);

    QmlApplicationViewer viewer;
    viewer.setOrientation(QmlApplicationViewer::ScreenOrientationLockPortrait);
    viewer.setMainQmlFile(QLatin1String("qml/HSWidgetSample/main.qml"));
    viewer.showExpanded();


    QSampleHSWidget hswidget;
    hswidget.RegisterWidget();

    QSampleSMHSWidget smhswidget;
    smhswidget.RegisterWidget();

    QAppSwitcher switcher;
    QObject::connect(&hswidget, SIGNAL(BringMeToForeground()), &switcher, SLOT(BringToFront()));

    return app.exec();
}
